<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/cms/cmsmd.js"></script>
	</head>
	<body>
		<!-- 表格 -->
		<table id="cmsmdTable" title="员工管理" border="0" cellspacing="0" cellpadding="0" iconCls="icon-tip" width="98%" idField="mdaa" pagination="true" remoteSort="false" singleSelect="false" showFooter="false" striped="true" url="<c:url value='/cmsmd/cmsmdList.xhtml'/>">
			<thead>
				<tr align="center">
					<th field="mdaa" width="50">编号</th>
					<th field="mdac" width="60">姓名</th>
					<th field="mdad" width="80" formatter="mdadFormatter">部门</th>
					<th field="mdae" width="50" formatter="mdaeFormatter">性别</th>
				</tr>
			</thead>
		</table>
		<div id="cmsmdSearch" class="easyui-window" title="查询" style="padding:5px;width:300px;height:280px;" iconCls="icon-search" closed="true" maximizable="false" minimizable="false" collapsible="true">
			<form action="<c:url value='/cmsmd/cmsmdList.xhtml'/>" method="post" name="searchForm" id="searchForm">
				<div class="ToolTip_Form" id="tableCmsmdSearch" onkeydown="if(event.keyCode==13){searchCmsmd();}">
					<table>
						<tr>
							<td align="right">编号:</td>
							<td align="left"><input type="text" name="mdaa" id="searchMdaa" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">姓名:</td>
							<td align="left"><input type="text" name="mdac" id="searchMdac" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">部门:</td>
							<td align="left">
								<select id="searchMdad" name="mdad" style="width:150px;" class="easyui-combobox">
									<option value="">请选择</option>
									<c:if test="${allCmsmbList != null}">
										<c:forEach var="item" items="${allCmsmbList}" varStatus="num">
											<option value="${item.mbaa}">${item.mbaa}_${item.mbab}</option>
										</c:forEach>
									</c:if>
								</select>
							</td>
						</tr>
						
						<tr>
							<td colspan="2" align="center"><a class="easyui-linkbutton" iconCls="icon-search" href="javascript:void(0);" onclick="searchCmsmd()">查询</a></td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 添加 -->
		<div id="cmsmdAdd" icon="icon-save" style="padding:5px;width:580px; height:350px;">
			<form action="<c:url value='/cmsmd/saveCmsmd.xhtml'/>" method="post" name="addForm" id="addForm">
				<div class="ToolTip_Form" id="tableCmsmdAdd" onkeydown="if(event.keyCode==13){cmsmdAdd();}">
					<table>
						<tr>
							<td align="right" width="100px">编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmdAddMdaa" name="mdaa" maxlength="20" required="true" validType="sieralNumber" missingMessage="编号不能为空!"/></td>
							<td align="right">密码：</td>
							<td align="left"><input type="password" class="easyui-validatebox" id="cmsmdAddMdab" name="mdab" maxlength="20" required="true" validType="passwowrd" missingMessage="密码不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">姓名：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmdAddMdac" name="mdac" maxlength="20" required="true" validType="length[1,10]" missingMessage="姓名不能为空!" invalidMessage="姓名不能超过20个字!"/></td>
							<td align="right">部门：</td>
							<td align="left">
								<select id="cmsmdAddMdad" name="mdad" style="width:150px;" class="easyui-combobox" required="true" missingMessage="请选择部门!">
									<c:if test="${allCmsmbList != null}">
										<c:forEach var="item" items="${allCmsmbList}" varStatus="num">
											<option value="${item.mbaa}">${item.mbaa}_${item.mbab}</option>
										</c:forEach>
									</c:if>
								</select>
							</td>
						</tr>
						<tr>
							
							<td align="right">性别：</td>
							<td align="left"><input type="radio" id="cmsmdAddMdae1" name="mdae" value="1" checked="checked"/>男<input type="radio" id="cmsmdAddMdae2" name="mdae" value="2"/>女</td>
						</tr>
					
						<tr>
							<td align="right">权限：</td>
							<td align="left" colspan="3">
								<input type="checkbox" id="cmsmdAddMdaf1" name="mdafs" value="1" checked="checked" onclick="return false;">查询
								<input type="checkbox" id="cmsmdAddMdaf2" name="mdafs" value="2">增加
								<input type="checkbox" id="cmsmdAddMdaf3" name="mdafs" value="3">修改
								<input type="checkbox" id="cmsmdAddMdaf4" name="mdafs" value="4">删除
								<input type="checkbox" id="cmsmdAddMdaf5" name="mdafs" value="5">审核
								<input type="checkbox" id="cmsmdAddMdaf6" name="mdafs" value="6">撤销审核
								<input type="checkbox" id="cmsmdAddMdaf7" name="mdafs" value="7">作废
							</td>
						</tr>
						<tr>
							<td colspan="4" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmdAdd();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmdAddReset();">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="cmsmdUpdate" icon="icon-edit" style="padding:5px;width:580px;height:350px;">
			<form action="<c:url value='/cmsmd/updateCmsmd.xhtml'/>" method="post" name="updateForm" id="updateForm">
				<div class="ToolTip_Form" id="tableCmsmdUpdate" onkeydown="if(event.keyCode==13){cmsmdUpdate();}">
					<input type="hidden" id="cmsmdInfoUpdateMdaa" name="mdaa"/>
					<table>
						<tr>
							<td align="right" width="100px">编号：</td>
							<td align="left"><span id="cmsmdUpdateMdaa"></span></td>
						</tr>
						<tr>						
							<td align="right">姓名：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmdUpdateMdac" name="mdac" maxlength="20" required="true" validType="length[1,10]" missingMessage="姓名不能为空!" invalidMessage="姓名不能超过10个字!"/></td>
						</tr>
						<tr>
							<td align="right">部门：</td>
							<td align="left">
								<select id="cmsmdUpdateMdad" name="mdad" style="width:150px;" class="easyui-combobox" required="true" missingMessage="请选择部门!">
									<c:if test="${allCmsmbList != null}">
										<c:forEach var="item" items="${allCmsmbList}" varStatus="num">
											<option value="${item.mbaa}">${item.mbaa}_${item.mbab}</option>
										</c:forEach>
									</c:if>
								</select>
							</td>
							
						</tr>
						<tr>
							<td align="right">性别：</td>
							<td align="left"><input type="radio" id="cmsmdUpdateMdae1" name="mdae" value="1" checked="checked"/>男<input type="radio" id="cmsmdUpdateMdae2" name="mdae" value="2"/>女</td>
							
						</tr>
					
						<tr>
							<td align="right">权限：</td>
							<td align="left" colspan="3">
								<input type="checkbox" id="cmsmdUpdateMdaf1" name="mdafs" value="1" checked="checked" onclick="return false;">查询
								<input type="checkbox" id="cmsmdUpdateMdaf2" name="mdafs" value="2">增加
								<input type="checkbox" id="cmsmdUpdateMdaf3" name="mdafs" value="3">修改
								<input type="checkbox" id="cmsmdUpdateMdaf4" name="mdafs" value="4">删除
								<input type="checkbox" id="cmsmdUpdateMdaf5" name="mdafs" value="5">审核
								<input type="checkbox" id="cmsmdUpdateMdaf6" name="mdafs" value="6">撤销审核
								<input type="checkbox" id="cmsmdUpdateMdaf7" name="mdafs" value="7">作废
							</td>
						</tr>
						<tr>
							<td colspan="4" align="center">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmdUpdate();">提交</a>
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmdUpdateReset(items[0],items[1],items[2],items[3],items[4]);">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="pda" icon="icon-edit" style="padding:5px;width:450px;height:400px;">
			<form method="post" name="pdaForm" id="pdaForm">
				<div class="ToolTip_Form" id="pdaUpdateForm" onkeydown="if(event.keyCode==13){pdaUpdate();}">
					<input type="hidden" id="pdaHidMdaa" name="pdaHidMdaa" value=""/>
					<table>
						<tr>
							<td align="right">员工编号：</td>
							<td align="left"><span id="pdaMdaa"></span></td>
						</tr>
						<tr>
							<td align="right">员工姓名：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="pdaMdab" name="mbab" maxlength="20" required="true" validType="length[1,20]" missingMessage="名称不能为空!"   invalidMessage="名称不能超过20个字!"/></td>
						</tr>
						
						<tr>
							<td colspan="2">
								<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
									<tr bgcolor="#EEEEEE">
										<th width="4%" align="center" height="30"><input type="checkbox" name="checkallupdate" id="checkallupdate"/></th>
										<th width="8%">ID</th>
										<th width="25%">PDA模块名称</th>
									</tr>
									<c:if test="${allCmspdaList != null}">
										<c:forEach var="item" items="${allCmspdaList}" varStatus="num">
											<tr bgcolor="#FFFFFF">
												<td class="alt">
													<input type="checkbox" name="daaaUpdate" value="${item.daaa}"/>
												</td>
												<td class="alt">${item.daaa}</td>
												<td class="alt">${item.daab}</td>
												
											</tr>
										</c:forEach>
									</c:if>
								</table>
							</td>
						</tr>
						<tr>
							<td align="center" colspan="2">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="pdaUpdate();">提交</a>&nbsp;&nbsp;&nbsp;
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="pdaUpdateReset(items[0],items[1],items[2]);">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>